﻿<?xml version="1.0" encoding="utf-8" ?>
<spider config="path">
  <program>
    <declare>
      <commands>
        <command>
          <![CDATA[
        using System;
        using System.Collections.Generic;
        using System.Text;
        using System.IO;

          class Program
          {
            static void Main(string[] args)
            {]]>
        </command>
      </commands>
      <param name="name" value="string"/>
    </declare>
    <icon id="compile-args-icon">
      <commands>
        <command>
          <![CDATA[/win32icon:{file}]]>
        </command>
      </commands>
      <param name="file" value="string"/>
    </icon>
    <arguments/>
    <platform id="compile-args-platform">
      <commands>
        <command>
          <![CDATA[/platform:{name}]]>
        </command>
      </commands>
      <param name="name" value="platform"/>
    </platform>
    <title id="assembly-title">
      <param name="assembly-title" value="string"/>
    </title>
    <description id="assembly-description">
      <param name="assembly-description" value="string"/>
    </description>
    <configuration id="assembly-configuration">
      <param name="assembly-configuration" value="string"/>
    </configuration>
    <company id="assembly-company">
      <param name="assembly-company" value="string"/>
    </company>
    <product id="assembly-product">
      <param name="assembly-product" value="string"/>
    </product>
    <copyright id="assembly-copyright">
      <param name="assembly-copyright" value="string"/>
    </copyright>
    <trademark id="assembly-trademark">
      <param name="assembly-trademark" value="string"/>
    </trademark>
    <version id="assembly-version">
      <param name="assembly-version" value="string"/>
    </version>
  </program>
  <audio>
    <play>
      <commands>
        <command>
          <![CDATA[System.Media.SoundPlayer sp = new System.Media.SoundPlayer("{file}"); sp.Play();]]>
        </command>
      </commands>
      <param name="file" value="string"/>
    </play>
  </audio>
  <file>
    <create>
      <commands>
        <command>
          <![CDATA[File.Create("{file}");]]>
        </command>
      </commands>
      <param name="file" value="string"/>
    </create>
    <delete>
      <commands>
        <command>
          <![CDATA[File.Delete("{file}");]]>
        </command>
      </commands>
      <param name="file" value="string"/>
    </delete>
    <read>
      <param name="file" value="string"/>
    </read>
    <writeText>
      <commands>
        <command>
          <![CDATA[File.WriteAllText("{file}", "{content}");]]>
        </command>
      </commands>
      <param name="file" value="string"/>
      <param name="content" value="string"/>
    </writeText>
    <writeBytes>
      <commands>
        <command>
          <![CDATA[File.WriteAllBytes("{file}", {bytes});]]>
        </command>
      </commands>
      <param name="file" value="string"/>
      <param name="bytes" value="bytes"/>
    </writeBytes>
    <move>
      <commands>
        <command>
          <![CDATA[File.Move("{source}", "{dest}");]]>
        </command>
      </commands>
      <param name="source" value="string"/>
      <param name="dest" value="string"/>
    </move>
    <copy>
      <commands>
        <command>
          <![CDATA[File.Copy("{source}", "{dest}", {overwrite});]]>
        </command>
      </commands>
      <param name="source" value="string"/>
      <param name="dest" value="string"/>
      <param name="overwrite" value="bool"/>
    </copy>
    <attributes/>
  </file>
  <dir>
    <create>
      <commands>
        <command>
          <![CDATA[Directory.CreateDirectory("{dir}");]]>
        </command>
      </commands>
      <param name="dir" value="string"/>
    </create>
    <delete>
      <commands>
        <command>
          <![CDATA[Directory.Delete("{dir}");]]>
        </command>
      </commands>
      <param name="dir" value="string"/>
    </delete>
    <attributes/>
  </dir>
  <var id="var">
    <declare id="declaration">
      <commands>
        <command>
          <![CDATA[object {name} = {value};]]>
        </command>
      </commands>
      <param name="name" value="string"/>
      <param name="value" value="obj"/>
    </declare>
    <delete>
      <commands>
        <command>
          <![CDATA[{name} = null;]]>
        </command>
      </commands>
      <param name="name" value="string"/>
    </delete>
  </var>
  <console>
    <writeln>
      <commands>
        <command>
          <![CDATA[Console.WriteLine("{value}");]]>
        </command>
      </commands>
      <param name="value" value="string"/>
    </writeln>
    <title>
      <commands>
        <command>
          <![CDATA[Console.Title = "{value}";]]>
        </command>
      </commands>
      <param name="value" value="string"/>
    </title>
    <stop>
      <commands>
        <command>
          <![CDATA[Console.ReadLine();]]>
        </command>
      </commands>
    </stop>
    <forecolor>
      <commands>
        <command>
          <![CDATA[Console.ForegroundColor = ConsoleColor.{color};]]>
        </command>
      </commands>
      <param name="color" value="color"/>
    </forecolor>
    <backcolor>
      <commands>
        <command>
          <![CDATA[Console.BackgroundColor = ConsoleColor.{color};]]>
        </command>
      </commands>
      <param name="color" value="color"/>
    </backcolor>
    <resetcolor>
      <commands>
        <command>
          <![CDATA[Console.ForegroundColor = ConsoleColor.White; Console.BackgroundColor = ConsoleColor.Black;]]>
        </command>
      </commands>
    </resetcolor>
    <beep>
      <commands>
        <command>
          <![CDATA[Console.Beep({freq}, {duration});]]>
        </command>
      </commands>
      <param name="freq" value="int"/>
      <param name="duration" value="int"/>
    </beep>
    <erase>
      <commands>
        <command>
          <![CDATA[Console.Clear();]]>
        </command>
      </commands>
    </erase>
    <width>
      <commands>
        <command>
          <![CDATA[Console.WindowWidth = {width};]]>
        </command>
      </commands>
      <param name="width" value="int"/>
    </width>
    <height>
      <commands>
        <command>
          <![CDATA[Console.WindowHeight = {height};]]>
        </command>
      </commands>
      <param name="height" value="int"/>
    </height>
  </console>
  <method>
    <declare>
      <commands>
        <command>
          <![CDATA[private void {name}() { {commands} }]]>
        </command>
      </commands>
      <param name="name" value="string"/>
      <param name="commands" value="!INNER_SET!"/>
    </declare>
    <call>
      <commands>
        <command>
          <![CDATA[{name}();]]>
        </command>
      </commands>
      <param name="name" value="string"/>
    </call>
  </method>
  <loop>
    <begin>
      <commands>
        <command>
          <![CDATA[while ({condition}) { {commands} }]]>
        </command>
      </commands>
      <param name="condition" value="bool"/>
      <param name="commands" value="!INNER_SET!"/>
    </begin>
    <var/>
    <exit>
      <commands>
        <command>
          <![CDATA[break;]]>
        </command>
      </commands>
    </exit>
  </loop>
  <foreach>
    <begin>
      <commands>
        <command>
          <![CDATA[foreach ({var} in {array}) { {commands} }]]>
        </command>
      </commands>
      <param name="var" value="var"/>
      <param name="array" value="array"/>
      <param name="commands" value="!INNER_SET!"/>
    </begin>
    <var/>
    <exit>
      <commands>
        <command>
          <![CDATA[break;]]>
        </command>
      </commands>
    </exit>
  </foreach>
  <condition>
    <check>
      <commands>
        <command>
          <![CDATA[if ({condition}) { {then} } else { {else} }]]>
        </command>
      </commands>
      <param name="condition" value="bool"/>
      <param name="then" value="!INNER_SET!"/>
      <param name="else" value="!INNER_SET!"/>
    </check>
  </condition>
  <cast>
    <string>
      <commands>
        <command>
          <![CDATA[Convert.ToString({var});]]>
        </command>
      </commands>
      <param name="var" value="var"/>
    </string>
    <int>
      <commands>
        <command>
          <![CDATA[Convert.ToInt32({var});]]>
        </command>
      </commands>
      <param name="var" value="var"/>
    </int>
  </cast>
  <typeDefinitions>
    <color>
      <White/>
      <Black/>
      <Yellow/>
      <Green/>
      <Cyan/>
    </color>
    <bool>
      <true/>
      <false/>
    </bool>
    <platform>
      <x86/>
      <Itanium/>
      <x64/>
      <anycpu/>
    </platform>
  </typeDefinitions>
</spider>